package puyu.manage.service.template.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *  @ClassName: 调用外部接口
 *  @author: whl
 *  @Date: 2024/5/29 9:38
 *  @Description: Description of this class
 */
@FeignClient(name = "bdmMasterDataService", url = "${fasp.commondata.server.address:http://10.65.246.69}")
@RequestMapping("/fasp/restapi/v1")
public interface MasterDataService {
    /**
     * 向中台推送部门整体绩效的数据到中台
     * @param mof_div_code  区划
     * @param fiscal_year 年度
     * @param goalPerfList 部门整体绩效数据
     * @return
     */
    @PostMapping(value = "/masterdata/collector/BUDGETCLASSMERITS/{mof_div_code}/{fiscal_year}/")
    @ResponseBody
    Map<String, Object> writeGoalPerform2MasterData(@PathVariable(value = "mof_div_code") String mof_div_code, @PathVariable(value = "fiscal_year") String fiscal_year, @RequestBody List<Map<String, Object>> goalPerfList);

    /**
     * 向中台推送部门预算的数据
     * @param dataMap  对象 集合 mof_div_code  区划 fiscal_year 年度 agencys  单位  dataLists 部门预算数据
     * @return
     */
    @PostMapping(value = "/masterdata/collector/PMANNUAL")
    @ResponseBody
    Map<String, Object> writePmAnnualMasterData(@RequestBody(required = true) HashMap<String, Object> dataMap);

    /**
     * 向中台推送部门预算的数据
     * @param dataMap 对象 集合 mof_div_code  区划 fiscal_year 年度 agencys  单位 dataLists 政府采购的数据
     * @return
     */
    @PostMapping(value = "/masterdata/collector/GOVPUR")
    @ResponseBody
    Map<String, Object> writeGovpurMasterData(@RequestBody(required = true) HashMap<String, Object> dataMap);

    /**
     * 向中台推送转移支付的数据
     * @param dataMap 对象 集合 mof_div_code  区划  fiscal_year 年度 agencys  单位 dataLists 转移支付的数据
     * @return
     */
    @PostMapping(value = "/masterdata/collector/TRA")
    @ResponseBody
    Map<String, Object> writeTraMasterData(@RequestBody(required = true) HashMap<String, Object> dataMap);

    /**
     * 调用中台删除公开数据
     * @param dataMap 对象 集合 mof_div_code  区划  fiscal_year 年度 agencys  单位 tableCode 表名
     * @return
     */
    @PostMapping(value = "/masterdata/collector/deletePurchase")
    @ResponseBody
    Map<String, Object> delPurchaseMasterData(@RequestBody(required = true) HashMap<String, Object> dataMap);

    /**
     * 调用中台确认接口数据
     * @param dataMap 对象 集合
     * @return
     */
    @PostMapping(value = "/masterdata/collector/confirmlog")
    @ResponseBody
    Map<String, Object> writeConfirmlogMasterData(@RequestBody(required = true) Map<String, Object> dataMap);

    /**
     * 调用中台推送政府收支数据
     * @param dataMap 对象 集合
     * @return
     */
    @PostMapping(value = "/masterdata/collector/GOVBGTINCANDEXP/{mof_div_code}/{fiscal_year}")
    @ResponseBody
    Map<String, Object> writeGOVBGTMasterData(@PathVariable(value = "mof_div_code") String mof_div_code, @PathVariable(value = "fiscal_year") String fiscal_year, @RequestBody(required = true) List<Map<String, Object>> dataMap);


    /**
     * 调用中台推送政府收支数据
     * @param dataMap 对象 集合
     * @return
     */
    @PostMapping(value = "/masterdata/collector/GOVTLYEARDATAADD/{mof_div_code}/{fiscal_year}")
    @ResponseBody
    Map<String, Object> writeGOVTLYEARDATAADDData(@PathVariable(value = "mof_div_code") String mof_div_code, @PathVariable(value = "fiscal_year") String fiscal_year, @RequestBody(required = true) List<Map<String, Object>> dataMap);


    /**
     * 调用中台查询财政资金结转指标信息数据
     * @param dataMap 对象 集合
     * @return
     */
    @PostMapping(value = "/masterdata/ranges/BABGTCARRYOVERS")
    @ResponseBody
    Map<String, Object> queryBABGTCARRYOVERSData(@RequestBody(required = true) Map<String, Object> dataMap);

  /**
     * 调用中台推送政府收支日常动态维护数据
     * @param dataMap 对象 集合
     * @return
     */
    @PostMapping(value = "/masterdata/collector/report/GOVBGTINCANDEXP/{mof_div_code}/{fiscal_year}")
    @ResponseBody
    Map<String, Object> writeGovRcdtMasterData(@PathVariable(value = "mof_div_code") String mof_div_code, @PathVariable(value = "fiscal_year") String fiscal_year, @RequestBody(required = true) List<Map<String, Object>> dataMap);

    /**
     * 调用中台查询采购结转和调剂数据
     * @param dataMap 对象 集合
     * @return
     */
    @PostMapping(value = "/masterdata/ranges/GOVPURMIDYEARBUDGET")
    @ResponseBody
    Map<String, Object> queryGOVPURMIDYEARBUDGETData(@RequestBody(required = true) Map<String, Object> dataMap);


    /**
     * 调用中台推送调整调剂数据
     * @param dataList 对象 集合
     * @return
     */
    @PostMapping(value = "/masterdata/collector/PMGOVBGT")
    @ResponseBody
    Map<String, Object> sendTZTJData(@RequestBody(required = true) List<Map<String, Object>> dataList);


}
